import java.util.Scanner;

public class Fibonacci {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int fibo = fibonacci(scanner.nextInt());
        System.out.println(fibo);
    }
    public static int fibonacci(int n){
        int num1 = 1;
        int num2 = 1;
        int temp = num1 + num2;
        if(n == 1 || n == 2){
            return 1;
        }
        for (int i = 3; i <= n; i++) {
            num1 = num2;
            num2 = temp;
            temp = num1 + num2;
        }
        return num2;
    }
}
